package com.yunyike.constants;

/**
 * @author zhengqiang.shi
 * 2015-11-22 下午10:13:25
 */
public enum EnumExchangeRate {

	USD(1.0623),	// 美元(USD)
	HKD(8.2327),	// 港币(HKD)
	GBP(0.7041),	// 英镑(GBP)
	JPY(130.2380),	// 日元(JPY)
	CNY(6.7857);	// 人民币(CNY)

	double exchangeRate;

	private EnumExchangeRate(double exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public double getExchangeRate() {
		return exchangeRate;
	}

	public void setExchangeRate(double exchangeRate) {
		this.exchangeRate = exchangeRate;
	}
	
	public static void main(String[] args) {
		
		/*EnumExchangeRate[] values = EnumExchangeRate.values();
		
		for (EnumExchangeRate enumExchangeRate : values) {
			
			System.out.println(enumExchangeRate.getExchangeRate());
		}*/
		
		EnumExchangeRate valueOf = EnumExchangeRate.valueOf("EUR");
		System.out.println(valueOf.exchangeRate);
	}
}
